package com.excelib.controller;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author 刘博文
 * @date 2017/3/23 0023 22:45
 */
@Controller
public class GoController {
	private final Log logger = LogFactory.getLog(GoController.class);

	@RequestMapping(value = "/" , method = RequestMethod.HEAD)
	public String head(){
		return "go";
	}

	@RequestMapping(value = {"index","/"} , method = RequestMethod.GET)
	public String index(Model model) throws Exception{
		logger.info("======processed by index============");
		model.addAttribute("msg","go go go");
		return "go";
	}
}
